home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / bipl.zip / PROCS.ZIP / REC2TAB.ICN < prev    next >
Text File  |  1992-11-20  |  640b  |  28 lines

  1. ############################################################################
  2. #
  3. #    File:     rec2tab.icn
  4. #
  5. #    Subject:  Procedure to write record as tab-separated string
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     September 2, 1991
  10. #
  11. ###########################################################################
  12. #
  13. #  This procedure writes fields of a record as tab-separated string.
  14. #  Carriage returns in files are converted to vertical tabs.
  15. #  (Works for lists too.)
  16. #
  17.  
  18. procedure rec2tab(x)
  19.    local i
  20.  
  21.    i := *x - 1
  22.    every writes(map(!x, "\n", "\v"),"\t") \ i
  23.    write(map(x[-1], "\n", "\v"))
  24.  
  25.    return
  26.  
  27. end
  28.